package com.example.spring3.service.iml;

import com.example.spring3.entity.User;
import com.example.spring3.mapper.UserMapper;
import com.example.spring3.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceIml implements UserService {
    @Autowired
    UserMapper userMapper;
    @Override
    public int insertUser(String username, String password, String phone, String email) {
            return userMapper.insert(username,password,phone,email);
    }

    @Override
    public int slectByUsername(String username) {
        return userMapper.selectByUsername(username);
    }

    @Override
    public User getUserByUsername(String username) {
        return userMapper.findByUsername(username);
    }
}
